package com.booklove.domain.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("orders")
@ApiModel(value="OrdersVO对象", description="订单列表")
public class OrdersVO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;


    @ApiModelProperty(value = "订单属于的用户")
    private Integer userId;

    @ApiModelProperty(value = "订单的接收者的自动生成的商户id")
    private Integer userShopId;

    @ApiModelProperty(value = "订单对应的笔记id")
    private Integer noteId;

    @ApiModelProperty(value = "许愿书本的id")
    private Integer wishBookId;

    @ApiModelProperty(value = "捐书id")
    private Integer donateBookId;

    @ApiModelProperty(value = "派送id")
    private Integer deliverId;

    @ApiModelProperty(value = "订单类型：0-捐赠或是1-许愿")
    private Integer orderType;

    @ApiModelProperty(value = "订单的状态-0-待接单-1-派送还是2-送达")
    private Integer orderState;

    @ApiModelProperty(value = "创建人")
    private Integer createdBy;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createdTime;

    @ApiModelProperty(value = "更新人")
    private Integer updatedBy;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updatedTime;



    /*
    对应的详细信息
    1、许愿
    2、捐献
     */
    @ApiModelProperty(value = "书名，冗余的字段，减少查询，此订单的书名")
    private String bookName;

    @ApiModelProperty(value = "对应的是许愿书籍和捐赠书籍的title")
    private String title;




}
